import com.thoughtworks.selenium.SeleneseTestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import com.thoughtworks.selenium.*;
public class keyword2 extends SeleneseTestCase{
//public class keyword2{
	@Before

	public void setUp() throws Exception{
		System.out.println("before test");
		selenium= new DefaultSelenium("Localhost", 4444, "*chrome", "http://www.google.com");
		System.out.println("opening google");
		selenium.start();
	}
	
	@Test
	public void testblock() {
		System.out.println("at test");
		sOpen("http://www.twitter.com");
	}
	@After
	public void tearDown() {
		System.out.println("after test");
		System.out.println("opened google");
	}
	
	public void sOpen(String vURL){
		//purpose:Navigates to theURL
		selenium.open(vURL);
		}
	public void sType(String eID,String sText ){
		selenium.type(eID, sText) ;
	}
	public void sSelect(String eID,String sText ){
		selenium.select(eID, sText);
	}
	public void sClick(String eID){
		selenium.click(eID);
	}
	public void sWait(String eTimes){
		selenium.waitForPageToLoad(eTimes);
	}
	public void sClickAndWait(String eID,String eTimes ){
		selenium.click(eID);
		selenium.waitForPageToLoad(eTimes);
	}
	public String sGetText(String eID){
		return selenium.getText(eID);
	}
	public String sGetValue(String eID){
		return	selenium.getValue(eID);
	}

public String sVerifyText(String eID, String sText){
	if(selenium.getText(eID).equals(sText)){
		return "exists";
	}else
	{
		return "Does not Exist";
	}
	}
	}